[HVM] Save/restore: trigger FPU state save based on v->fpu_initialised
authorTim Deegan <Tim.Deegan@xensource.com>
Mon, 4 Jun 2007 16:09:12 +0000 (17:09 +0100)
committerTim Deegan <Tim.Deegan@xensource.com>
Mon, 4 Jun 2007 16:09:12 +0000 (17:09 +0100)
and not on the i387_valid flag, which has no meaning in this context.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
xen/arch/x86/hvm/hvm.c

index 45a185456883e8f6942d963693e89f06c79b4b4a..1d70e4a3993c07276995eafa07fdca24772a91bd 100644 (file)
@@ -269,7 +269,7 @@ static int hvm_save_cpu_ctxt(struct domain *d, hvm_domain_context_t *h)
 
         /* Other vcpu register state */
         vc = &v->arch.guest_context;
-        if ( vc->flags & VGCF_i387_valid )
+        if ( v->fpu_initialised )
             memcpy(ctxt.fpu_regs, &vc->fpu_ctxt, sizeof(ctxt.fpu_regs));
         else 
             memset(ctxt.fpu_regs, 0, sizeof(ctxt.fpu_regs));
@@ -361,7 +361,7 @@ static int hvm_load_cpu_ctxt(struct domain *d, hvm_domain_context_t *h)
     vc->debugreg[6] = ctxt.dr6;
     vc->debugreg[7] = ctxt.dr7;
 
-    vc->flags = VGCF_i387_valid | VGCF_online;
+    vc->flags = VGCF_online;
     v->fpu_initialised = 1;
 
     /* Auxiliary processors should be woken immediately. */